<?php
/**
 * Login_Data_Registredmailvalue
 * registred mail value
 * @author Adrian Stolarski
 */
class Login_Data_Registredmailvalue implements Login_Data_Mainable {
    
    /**
     *
     * @var type mail_sender
     * mail sender handler
     */
    public $mail_sender;
    
    /**
     * constructor()
     */
    public function __construct() {
        $this->mail_sender = new Core_Controller_Mailsender;
    }
    
    /**
     * main()
     * send email to user
     * @param array $variables
     */
    public function main(array $variables = null) {
        $mail = array();
        //var_dump($variables);
        $mail['user_email'] = $variables['user_email'];
        $mail['user_subject'] = REGISRED_EMAIL_SUBJECT;
        $mail['user_message'] = REGISTRED_USER_NAME."".$variables['user_name']."\r\n".REGISTRED_PASSWORD."".$variables['user_password']."\r\n".ACTIVATE_ACCOUNT_MESSAGE."".ACTIVATE_FORM."\r\n".THANK_TO_REGISTRED;
        //var_dump($mail);
        $this->mail_sender->main($mail);
    }

}
